﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class QuitManager : MonoBehaviour {
    private Button cancel;
    private Button determine;
    // Use this for initialization
    void Start () {
        cancel = GameObject.Find("Quit/QuitPanel/Cancel").GetComponent<Button>();
        determine = GameObject.Find("Quit/QuitPanel/Determine").GetComponent<Button>();

        if(cancel!=null&&determine!=null)
        {
            cancel.onClick.AddListener(Return);
            determine.onClick.AddListener(Exit);
        }
    }
    public void Return()
    {
        Time.timeScale = 1;
        UIshower.Instance.RecPlay(Nodeal.Quit);
    }
    public void Exit()
    {
        Application.Quit();
    }//结束游戏
}
